﻿
@{
    Lang lang = ViewBag.Lang;
    TGVR_Project.Models.FlightSearchModelView viewModel = (TGVR_Project.Models.FlightSearchModelView)ViewData["viewModel"];
}
<h2>
    @lang.RESALE</h2>
<form method="post" id="flightSearch">
<div id="search-ticket">
    <div id="search-title">
        @{
            string strTemp = lang.FLIGHTSEARCH;
            string[] arrFlight = strTemp.Split(' ');
        }
        <span style="color: Red; font-size: 40px; font-weight: bolder">@arrFlight[0]</span>
        <span style="color: Black; font-size: 30px;">@strTemp.Substring(arrFlight[0].Length)</span>
    </div>
    <div id="form">
        <div class="clear">
            <h3>@lang.INFO</h3>
            <div class="combo-input left" style="width: 100%">
                <div class="input-title">
                    @lang.TITLE</div>
                <input name="Title" class="input" required="required" style="width: 100%" />
            </div>
        </div>
        <div class="clear">
            <div class="combo-input left">
                <div class="input-title">
                    @lang.NAME</div>
                <input name="Name" class="input" required="required" />
            </div>
            <div class="combo-input left">
                <div class="input-title">
                    @lang.PHONE</div>
                <input name="Phone" class="input" required="required" />
            </div> 
            <div class="combo-input left">
                <div class="input-title">
                    @lang.EMAIL</div>
                <input name="Email" class="input" type="email" required="required" />
            </div> 
        </div>
        <div class="clear">
            <h3>@lang.FLIGHTTICKET</h3>
            <div class="combo-input left">
                <div class="input-title">
                    @lang.FIRM</div>
                <input name="Firm" class="input" required="required" />
            </div>
            <div class="combo-input left">
                <div class="input-title">
                    @lang.FLIGHTNO</div>
                <input name="FlightNo" class="input" required="required" />
            </div>
        </div>
        <div class="clear">
            <div class="combo-input left">
                <div class="input-title">
                    @lang.FROMCITY</div>
                <input class="input" id="fromcity1" name="StationForm" required = "required" value="@(ViewData["fromcity"] != null ? ViewData["fromcity"] : "")"/>
            </div>
            <div class="combo-input left">
                <div class="input-title">
                    @lang.DEPARTDATE</div>
                @(Html.Telerik().DatePicker()
                    .Name("Date")
                                            .HtmlAttributes(new { id = "DatePickerDepartDate_wrapper", @class = "input datetime", required = "required", type = "datetime" })
            .Min(viewModel.DatePickerDepartDate.MinDate.Value)
            .Max(viewModel.DatePickerDepartDate.MaxDate.Value)
            .ShowButton(true)
            .OpenOnFocus(true)
            .Value(viewModel.DatePickerDepartDate.SelectedDate.Value)
                    .Format("dd/MM/yyyy")
    )
            </div>
            <div class="combo-input left clear">
                <div class="input-title">
                    @lang.TOCITY</div>
                <input class="input" id="tocity1" name="StationTo" required = "required" value="@ViewData["tocity"]"/>
            </div>
            <div class="combo-input left">
                <div class="input-title">
                    @lang.PRICE</div>
                @(Html.Telerik().NumericTextBox()
                                .Name("Price").MinValue(0).Value(0).DecimalDigits(0).HtmlAttributes(new { required = "required" })
                )
            </div>
            <div class="combo-input left">
                <div class="input-title">
                    @lang.AMOUNT</div>
                @(Html.Telerik().NumericTextBox()
                                .Name("Amount").MinValue(0).Value(0).DecimalDigits(0).HtmlAttributes(new { required = "required" })
                )
            </div>
        </div>
        <div class="clear">
            <h3>@lang.EXTRAINFO</h3>
            <div class="combo-input left clear">
                <div class="input-title">
                    @lang.DESCRIPTION</div>
                <textarea style="width:920px" class="input" id="description" name="description"></textarea>
            </div>
        </div>
        <div class="combo-input left" style="margin-left: 20px;">
            <div class="input-title">
                &nbsp;</div>
            <div id="advanced">
                <button type="submit" style="float: right; width: 203px; height: 30px; margin: 0;
                    padding: 4px">@lang.RESALE</button>
            </div>
        </div>
    </div>
</div>
</form>
<script>
    $("flightSearch").validate();
</script>
